package com.sz.jinzheng.controller;

import com.sz.jinzheng.model.Result;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: ErrorsController 异常实现
 * @author: Sheep
 * @date: 2021年07月07日 18:05
 */
@RestController
public class ErrorsController implements ErrorController {
    @Override
    public String getErrorPath() {
        return "/error";
    }
    @RequestMapping("/error")
    public Result error() {
        return new Result("501","服务器错误请稍后再试");
    }
}
